<?php
set_time_limit(0);
include 'load.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {}
$shareInfoData=array();
$query=$mysqli->query("SELECT * FROM `orders` WHERE `isshot` = 7 limit 0,1 ");
while ($list=$query->fetch_assoc()){
    
    var_dump($list);
    echo "<br /><br />";
    $queryU=$mysqli->query("SELECT * FROM `uinfo` where openid='".$list['openid']."' limit 0,1 ");
    $getU=$queryU->fetch_assoc();
    
    var_dump($getU);
    echo "<br /><br />";
    echo 'name: ',$getU['username'];
    echo "<br /><br />";
    if (empty($getU['dizhi'])){
        echo 'kongdizhi---';
    }
    echo 'dizhi: ',$getU['dizhi'];
    echo "<br /><br />";
    
    if (isset($_GET['d'])){
        $mysqli->query("update `uinfo` set dizhi='".$_GET['d']."'  where openid='".$list['openid']."' ");
    }
    
    if (isset($_GET['n'])){
        $mysqli->query("update `uinfo` set username='".$_GET['n']."'  where openid='".$list['openid']."' ");
    }
    
    
    $queryU=$mysqli->query("SELECT * FROM `uinfo` where openid='".$list['openid']."' limit 0,1 ");
    $getU=$queryU->fetch_assoc();
    
    var_dump($getU);
    echo "<br /><br />";
    
    
    
    $queryU=$mysqli->query("SELECT * FROM `users` where openid='".$list['openid']."' limit 0,1 ");
    $getU=$queryU->fetch_assoc();
    
    var_dump($getU);
    echo "<br /><br />";
    
    exit;
    
}    
 
echo 'ok';
   